<?php

namespace app\admin\model\sales\pos;

use think\Model;

/**
 * Prints
 */
class Prints extends Model
{
    // 表主键
    protected $pk = 'soid';
    
    // 表名
    protected $name = 'sales_pos_prints';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;


    public function soidTable(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\sales\Debtortrans::class, 'soid', 'transno');
    }

    public function userTable(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\Admin::class, 'user', 'nickname');
    }
}